package com.qf.function;/*
*王浩政 
*whz
2022/9/6
12:00
*小米商城
*/

import com.qf.pojo.User;

import javax.naming.Name;
import java.util.function.Function;

public class FunctionTest {
    public static void main(String[] args) {

//        Function<String, User>function=new Function<String, User>() {
//            @Override
//            public User apply(String s) {
//                return null;
//            }
//        };
        Function<String,User>function=(name)->{
            User user=new User();
            user.setName(name);
            return user;
        };
        User user=function.apply("熊二");
        System.out.println(user);
    }
}
